<template>
  <div class="app-container">
    <!-- 表格 -->
    <merge-table highlight-current-row :merge-arr="ckMergeArr"
                 v-loading="loading" :table-data="ckList">
      <!--      <el-table-column type="selection" width="55" align="center"/>-->
<!--      <el-table-column label="序号" align="center" type="index"/>-->
<!--      <el-table-column show-overflow-tooltip label="仓库ID" align="center" prop="ckId"/>-->
      <el-table-column show-overflow-tooltip label="仓库名称" align="center" prop="ckName"/>
      <el-table-column show-overflow-tooltip label="货架名称" align="center" prop="hjName"/>
      <el-table-column show-overflow-tooltip label="分层名称" align="center" prop="fcName"/>
    </merge-table>

  </div>
</template>

<script>
import {getCkJl} from "@/api/wzgl/wzxx";
import MergeTable from "@/components/MergeTable/index.vue";

export default {
  name: "ckZl",
  components: {MergeTable},
 //仓库总览
  data() {
    return {
      ckMergeArr: ['ckName','hjName'],
      selectedRow: null, // 保存当前选中的行
      // 遮罩层
      loading: true,
      // 物资基本信息表格数据
      ckList: [],
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询物资基本信息列表 */
    getList() {
      this.loading = true;
      getCkJl().then(response => {
        this.ckList = response.data;
        console.log(this.ckList, 'dasaadsads')
        this.loading = false;
      });
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.wzxxId)
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
  }
};
</script>
